import Vue from 'vue'
import VueRouter from 'vue-router'
import Login from '@/views/login.vue'
import Layout from '@/views/layout.vue'
// import Home from '@/views/home.vue'
// import House from '@/views/house.vue'
// import Info from '@/views/info.vue'
// import My from '@/views/my.vue'
import Shoucang from '@/views/shoucang.vue'
import Chuzu from '@/views/chuzu.vue'

Vue.use(VueRouter)
const router = new VueRouter({
  routes: [
    {
      path: '/login',
      component: Login
    },
    {
      path: '/shoucang',
      component: Shoucang
    },
    {
      path: '/chuzu',
      component: Chuzu
    },
    {
      path: '/',
      component: Layout,
      children: [
        {
          path: '/home',
          component: () => import('@/views/home.vue')
        },
        {
          path: '/house',
          component: () => import('@/views/house.vue')
        },
        {
          path: '/info',
          component: () => import('@/views/info.vue')
        },
        {
          path: '/my',
          component: () => import('@/views/my.vue')
        }
      ]
    }
  ]
})

export default router
